/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DBPackage;

import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.ejb.Stateless;
import javax.jws.Oneway;

/**
 *
 * @author cloud
 */
@WebService(serviceName = "WSCustomer")
@Stateless()
public class WSCustomer {

    /**
     * This is a sample web service operation
     */
    @WebMethod(operationName = "hello")
    public String hello(@WebParam(name = "name") String txt) {
        return "Hello " + txt + " !";
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "accessDB")
    public void accessDB() {
        //TODO write your implementation code here:
        DBManager dbm = new DBManager();
        dbm.accessDB();
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "InsertCustomer")
    @Oneway
    public void InsertCustomer(@WebParam(name = "name") String name) {
        DBManager dbm = new DBManager();
        dbm.InsertCustomer(name);
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getNameLike")
    public String getNameLike(@WebParam(name = "like") String like) {
        DBManager dbm = new DBManager();
        return dbm.getNameLike(like);
    }
}
